package com.jingdianjichi.oss.config;

import io.minio.MinioClient;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * ClassName:MinioConfig
 * Package:com.jingdianjichi.oss.config
 * Description:
 *
 * @Author fst
 * @Create 2024/10/3 20:11
 * @Version 1.0
 */
@Configuration
public class MinioConfig
{
    @Value("${minio.url}")
    private String url;

    @Value("${minio.accessKey}")
    private String accessKey;


    @Value("${minio.secretKey}")
    private String secretKey;


    @Bean
    public MinioClient minioClient()
    {
        return MinioClient.builder().endpoint(url).credentials(accessKey,secretKey).build();
    }

}
